﻿using FreeSql.DataAnnotations;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace ProjectManageSystemApi.DbEntity
{
    [JsonObject(MemberSerialization.OptIn), Table(Name = "cost_type", DisableSyncStructure = true)]
    public class CostType
    {
        [JsonProperty, Column(Name = "id", IsPrimary = true, IsIdentity = true)]
        public int Id { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        [JsonProperty, Column(Name = "name", StringLength = 50)]
        public string Name { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        [JsonProperty, Column(Name = "desc", StringLength = 255)]
        public string Desc { get; set; }

        /// <summary>
        /// 创建人员
        /// </summary>
        [JsonProperty, Column(Name = "create_user")]
        public long CreateUser { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [JsonProperty, Column(Name = "create_time")]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 状态 0:存在，200：删除
        /// </summary>
        [JsonProperty, Column(Name = "state")]
        public sbyte State { get; set; }

        [Navigate(nameof(CreateUser))]
        public UserInfo UserInfo { get; set; }
    }
}
